package com.chinasoft.mapper;

import com.chinasoft.bean.Student;
import com.chinasoft.sql.ReturnSql;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface StudentMapper1 {

    @Select("select * from student")
    //@SelectProvider(type = ReturnSql.class,method = "getSelectAll")
    public List<Student> selectAll();

    //@Insert("insert into student values (#{id},#{name},#{age})")
    @InsertProvider(type = ReturnSql.class,method = "getInsert")
    public Integer insert(Student stu);

    @UpdateProvider(type = ReturnSql.class,method = "getUpdate")
    //@Update("update student set name=#{name},age=#{age} where id=#{id}")
    public Integer update(Student stu);

    //@Delete("delete from student where id=#{id}")
    @DeleteProvider(type = ReturnSql.class,method = "getDelete")
    public Integer delete(Integer id);
}